var i2c = require('i2c');

var sensor = i2c.open({
  id: 'I2C2'
});

var msgbuf = [0];
function sensor_Test(){
 
	/*
	读出来两个字节，第1个是温度、第2个是湿度
	*/
	var regval = sensor.read(2);
	console.log('read sensor temp is ' + regval[0] + ' humidity is ' + regval[1]);
	
}

setInterval(sensor_Test, 1000);

